import request from '@/utils/request'
//民主测评
export function getUserInfoList(data) {
  return request({
    url: '/kpiuserinfo/list',
    method: 'post',
    data
  })
}
export function getUserInfoListById(data) {
  return request({
    url: '/kpiuserinfo/listByid',
    method: 'post',
    data
  })
}

export function createUserInfo(data) {
  return request({
    url: '/kpiuserinfo/create',
    method: 'post',
    data
  })
}

export function updateUserInfo(data) {
  return request({
    url: '/kpiuserinfo/update',
    method: 'post',
    data
  })
}

export function yichuInfo(data) {
  return request({
    url: '/kpiuserinfo/yichu',
    method: 'post',
    data
  })
}

export function deleteUserInfo(data) {
  return request({
    url: '/kpiuserinfo/delete',
    method: 'delete',
    data
  })
}
export function getDeptList(data) {
  return request({
    url: '/kpiuserinfo/getdepartlist',
    method: 'post',
    data
  })
}
//根据id查询数据
export function getUserIdList(id) {
  console.log('id',id)
  return request({
    url: '/kpiuserinfo/getuseridlist?id='+id,
    method: 'post',
  })
}
//人员权重设置
export function weightUpdate(data) {
  return request({
    url: '/kpiuserinfo/weightupdate',
    method: 'post',
    data
  })
}


export function userLogin(data) {
  return request({
    url: '/person/userLogin',
    method: 'post',
    data
  })
}


export function loginSave() {
  return request({
    url: '/sysLoginInfo/create',
    method: 'post',
  })
}
export function loginList(data) {
  return request({
    url: '/sysLoginInfo/list',
    method: 'post',
    data
  })
}
